package com.tencent.iov.cowin.befsale.clue.repository.cus;

import com.github.pagehelper.Page;
import com.tencent.iov.cowin.befsale.clue.controller.cus.vo.request.ClueIntentionGradeDataRequest;
import com.tencent.iov.cowin.befsale.clue.domain.cus.po.OemCustomer;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

/**
 * @Describe: 总部客户表主表+客户好友关联表_Manager接口层
 * @author: xiamu
 * @created: 2021-12-21 18:37:26
 * @version: 1.0
 */
public interface OemCustomerManager {

    /**
     * 单条数据插入OemCustomer
     *
     * @param request
     * @return 插入的条数
     */
    int insert(OemCustomer request);

    /**
     * 批量插入OemCustomer
     *
     * @param requests
     * @return 批量插入的条数
     */
    int insertBatch(List<OemCustomer> requests);

    /**
     * 通过ID获取详细信息
     *
     * @param: id
     * @return: OemCustomer对象
     */
    OemCustomer getDetailById(Long id);

    /**
     * 单条OemCustomer更新
     *
     * @param request
     * @return 更新的条数
     */
    int update(OemCustomer request);

    /**
     * 通过ID删除数据
     *
     * @param id
     * @return 删除的条数
     */
    int delete(Integer id);

    /**
     * 根据条件查询对象list列表
     *
     * @param request
     * @return 查询结果
     */
    List<OemCustomer> getListByParam(OemCustomer request);

    /**
     * 根据条件查询对象page记录
     *
     * @param request
     * @return
     */
    Page<OemCustomer> getPageByParam(OemCustomer request, RowBounds rowBounds);

    /**
     * 根据条件查询单个对象
     *
     * @param request
     * @return 查询结果
     */
    OemCustomer getOneByParam(OemCustomer request);

    List<OemCustomer> checkOemCustomerPhone(OemCustomer request);

    List<OemCustomer> checkOemCustomerOneId(OemCustomer request);

    /**
     * 获取客户转线索的数量
     * add by zly
     * 2022-01-15
     * @param clueDataRequest
     * @return
     */
    Long getEmpBindCount(ClueIntentionGradeDataRequest clueDataRequest);
}